package test.example.tab.hy;


import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class Settings extends TabActivity {

	TabHost tabhost;
	TabSpec item_general;
	TabSpec item_alarm;

	private static final String TAG_GENERAL = "GENERAL";
	private static final String TAG_ALARM = "ALARM";

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_tabs);
		tabhost = getTabHost();
		setUpTabs();

	}

	private void setUpTabs() {
		tabhost.setup();
		item_general = tabhost.newTabSpec(TAG_GENERAL);
		item_general.setIndicator(TAG_GENERAL,
				getResources().getDrawable(android.R.drawable.ic_menu_manage));

		item_general.setContent(new Intent(this,test.example.tab.hy.AlarmPrferenceActivity.class));
		tabhost.addTab(item_general);

		item_alarm = tabhost.newTabSpec(TAG_ALARM);
		item_alarm.setIndicator(TAG_ALARM,
				getResources().getDrawable(R.drawable.ic_audio_alarm));
		item_alarm.setContent(R.id.tab_2);
		tabhost.addTab(item_alarm);
	}


}
